﻿{include file="Public/public" /}
<body>
 <div class="wrap">
  <div class="page-title">
    <span class="modular fl"><i class="user"></i><em>管理员列表</em></span>
    <span class="modular fr"><a href="/adminuser/addpower" class="pt-link-btn">+添加权限</a></span>
  </div>
  <table class="list-style Interlaced">
   <tr>
    <th>ID</th>
    <th>名称</th>
    <th>操作</th>
   </tr>
   {foreach name="power" item="row"}
     <tr>
      <td class="center">{$row['uid']}</td>
      <td class="center">{$row['name']}</td>
      <td class="center">
       <a href="/adminuser/powerinfo/id/{$row.jid}/uid/{$row['uid']}" title="进入分配权限"><img src="/static/admin/mo/images/icon_edit.gif"/></a>
       <a href="javascript:;" onclick="del(this)" id="{$row['uid']}"><img src="/static/admin/mo/images/icon_drop.gif"/></a>
      </td>
     </tr>
    {/foreach}
  </table>
  <style>
  .turnPage li{
    display: inline-block;
  }
.turnPage li span{
    
    
    padding: 5px 10px;
    cursor: pointer;
    background: #96aecd;
    color: #fff;
}
.turnPage .active span{
background: #1F6FD6;
}
  </style>
  
 
 </div>
</body>
</html>
<script>
  function del(ob){
      var ss=confirm("确定删除?");
      if(ss){
        var id=ob.id;
        $.post("/adminuser/deletepower",{id:id},function(data){
            if(data){
              alert('已删除');
              location.href="/adminuser/userpower";
            }else{
              alert('删除失败');
            }
        });
      }

  }
</script>